<?php

if ( !defined('IN_LC') )
{
	die('Hacking attempt_h');
}

global $page_title;
$title = '<title>' . $page_title . '</title>';

//find which page we are using
for ( $counter = 1; $counter <= 6; $counter += 1) {
	if( constant('MM_ID') == $counter){
		$button[$counter] = 'headerButtonOn';
		$class_href[$counter] = '';
	}
	else{
		$button[$counter] = 'headerButtonOff';
		$class_href[$counter] = 'class="mmhyper"';
	}
}
global $www_forums;
//$statistics
$forums = '<a href="' . $www_forums . '">' . $lang['Forums'] . '</a>';
$pb = ' | <a href="pb.php">' . $lang['PersonalBest'] . '</a> | <a href="liveview.php">' . $lang['LiveView'] . '</a>
		| <a href="statistics.php">' . $lang['statistics'] . '</a> | <a href="faq.php">' . $lang['Help'] . '</a>';

//are we logged in?
if (isset($_SESSION["valid_id"]))
{
	$rightText = str_replace("{LOGGEDIN_USER}", $_SESSION["valid_driver"],  $lang['CurrentlyLoggedIn']);
	$rightText = $rightText . ' | <a href="usercp.php">' . $lang['UserCP'] . "</a>"; 
	
	if(isset($_SESSION["valid_admin"]) && $_SESSION["valid_admin"] > 1)
	{
		$rightText = $rightText . ' | <a href="admin.php">' . $lang['Admin'] . "</a>"; 
	}
}
else
{
	$rightText = $lang['CurrentlyLoggedOut'];
}
$leftText = $forums . $pb;
include_once($skin_dir.'tpl/header.tpl');

?>
